#ifndef UT_H_
#define UT_H_

#include <stdlib.h>

typedef struct {
    const char *desc;
    void (*fun)(void);
} TestDesc;

void ut_pass();
void ut_fail(const char *what);

int     _ASSERT(int cond, const char *what);
int     _ASSERT_EQI(int is, int should, const char* what);
int     _ASSERT_EQS(const char *is, const char *should, const char *what);

#define ASSERT(cond, what)   if (_ASSERT(cond, what)) return
#define ASSERT_EQI(is, should, what)   if (_ASSERT_EQI(is, should, what)) return
#define ASSERT_EQS(is, should, what)   if (_ASSERT_EQS(is, should, what)) return


#endif

